﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SlamDunk.CMS.Model
{	
    /// <summary>
    /// DictionaryDetail视图模型类
    /// </summary>
	[Serializable]
	public class DictionaryDetailView
	{	
        #region 01.属性——Id
        /// <summary>
        /// 属性——Id
        /// </summary>
		public int Id { get; set; }
        #endregion
        
        #region 02.属性——DictId
        /// <summary>
        /// 属性——DictId
        /// </summary>
		public int DictId { get; set; }
        #endregion
        
        #region 03.外键属性——Dictionary
        /// <summary>
        /// 外键属性——Dictionary
        /// </summary>
        public Dictionary Dictionary { get; set; }
        #endregion
        
        #region 04.属性——OptionName
        /// <summary>
        /// 属性——OptionName
        /// </summary>
		public string OptionName { get; set; }
        #endregion
        
        #region 05.属性——Description
        /// <summary>
        /// 属性——Description
        /// </summary>
		public string Description { get; set; }
        #endregion
        
        #region 06.属性——Sort
        /// <summary>
        /// 属性——Sort
        /// </summary>
		public int Sort { get; set; }
        #endregion
        
        #region 07.属性——DelFlag
        /// <summary>
        /// 属性——DelFlag
        /// </summary>
		public bool DelFlag { get; set; }
        #endregion
        
        #region 08.属性——AddTime
        /// <summary>
        /// 属性——AddTime
        /// </summary>
		public DateTime AddTime { get; set; }
        #endregion
        
        #region 方法——转换为数据模型
        /// <summary>
        /// 转换为数据模型
        /// </summary>
        /// <returns>DictionaryDetail数据模型对象</returns>
        public Model.DictionaryDetail ToDataModel()
        {
            return new Model.DictionaryDetail()
            {
                Id = this.Id,
                DictId = this.DictId,
                OptionName = this.OptionName,
                Description = this.Description,
                Sort = this.Sort,
                DelFlag = this.DelFlag,
                AddTime = this.AddTime,
            };
        }
        #endregion
	}
}
